def myrange(start, stop=None, step=1):
    if stop == None:
        return list(range(0, start))
    else:
        return list(range(start, stop, step))


'''
a=int(input("输入开始："))
b=input("输入结束：")
if b == "":
    b = None
else:
    b = int(b)
c=input("输入步长：")
if c == "":
    s=myrange(a,b)
    print(s)
else:
    c=int(c)
    s=myrange(a,b,c)
    print(s)
'''


def jiafa(jia):
    k = 0
    for i in jia:
        k += i
        print(f"{i}=",end='') if i == jia[-1] else print(f"{i}+",end='')
    print(k)
    return k

def jianfa(jia):
    k = 0
    for i in jia:        
        if i == jia[0]:
            k = i
        else:
            k = k-i
        print(f"{i}=",end='') if i == jia[-1] else print(f"{i}-",end='')
    print(k)
    return k

def chengfa(jia):
    k = 1
    for i in jia:
        k = i*k
        print(f"{i}=",end='') if i == jia[-1] else print(f"{i}*",end='')
    print(k)
    return k

def chufa(jia):
    k = 0
    for i in jia:
        if i == jia[0]:
            k = i
        else:
            k = k/i
        print(f"{i}=",end='') if i == jia[-1] else print(f"{i}/",end='')
    print(k)
    return k
  
  
m = input("输入计算的类型（+ - * /）：")
l1 = []
while True:
    n = input("输入任意个数据(直接回车结束输入)：")
    if n == "":
        break
    l1.append(int(n))
if m == "+":
    jiafa(l1)
elif m == "-":
    jianfa(l1)
elif m == "*":
    chengfa(l1)
elif m == "/":
    chufa(l1)
else:
    print("运算法则还在研发中")
